import Request from '@utils/request';

const request = new Request('/api/order/');


/**
 * 申请退款
 */
export const aftersalesUserApply = (body) => {
  return request.post(`Aftersales/UserApply`, body);
};

/**
 * 售后列表
 */
export const aftersalesUserList = (params) => {
  return request.get(`Aftersales/UserList`, params);
};

/**
 * 取消
 */
export const aftersalesCancel = (body) => {
  return request.post(`Aftersales/Cancel`, body);
};

/**
 * 详情
 */
export const aftersalesInfo = (params) => {
  return request.get(`Aftersales/Info`, params);
};

/**
 * 发送物流
 */
export const logisticsDelivery = (body) => {
  return request.post(`Logistics/UserDelivery`, body);
};

/**
 * 获取物流
 */
export const getlogistics = (body) => {
  return request.post(`/Logistics/Get`, body);
};



/**
 * 换货签收
 */
export const aftersalesExchangeSignFor = (body) => {
  return request.post(`Aftersales/ExchangeSignFor`, body);
};

/**
 * 用户订单列表
 */
export const userList = (params) => {
  return request.get(`UserList`, params);
};

/**
 * 订单详情
 */
export const info = (params) => {
  return request.get(`Info`, params);
};

export const queryPay = (params) => {
  return request.get(`QueryPay`, params);
};

/**
 *  
 */
export const queryCount = (params) => {
  return request.get(`QueryCount`, params);
};

/**
 * 预下单
 */
export const preOrder = (body) => {
  return request.post(`PreOrder`, body);
};

/**
 * 下单
 */
export const onOrder = (body) => {
  return request.post(`OnOrder`, body);
};

/**
 * 去支付
 */
export const doPay = (body) => {
  return request.post(`DoPay`, body);
};

/**
 * 关闭订单
 */
export const close = (body) => {
  return request.post(`Close`, body);
};

/**
 * 签收
 */
export const signFor = (body) => {
  return request.post(`SignFor`, body);
};

/**
 * 取消和退款
 */
export const cancelAndRefund = (body) => {
  return request.post(`CancelAndRefund`, body);
};

/**
 * 
 */
 export const evaluate = (body) => {
  return request.post(`Evaluate`, body);
};